package com.moyq5.mvc.maker.test.bean.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

/**
 * 渠道交易记录
 * @author Moyq5
 * @date 2018年6月30日
 */
@Entity
@Table(name = "tra_channel_order")
@DynamicUpdate
public class TraChannelOrder implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	/**
	 * 渠道交易ID
	 */
	@Id
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "native")@GenericGenerator(name = "native", strategy = "native")
    @Column(name = "order_id")
	private Long orderId;
	/**
	 * 渠道
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "channel_id")
	private TraChannel channel;
	/**
	 * 渠道商户
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "channel_merch_id")
	private TraChannelMerch channelMerch;
	/**
	 * 渠道名称
	 */
	@Column(name = "channel_name", length = 100)
	private String channelName;
	/**
	 * 渠道商户名称
	 */
	@Column(name = "channel_merch_name", length = 100)
	private String channelMerchName;
	/**
	 * 渠道商户号
	 */
	@Column(name = "channel_merch_no", length = 30)
	private String channelMerchNo;
	/**
	 * 渠道单号
	 */
	@Column(name = "channel_order_no", length = 30)
	private String channelOrderNo;
	public Long getOrderId() {
		return orderId;
	}
	public void setOrderId(Long orderId) {
		this.orderId = orderId;
	}
	public TraChannel getChannel() {
		return channel;
	}
	public void setChannel(TraChannel channel) {
		this.channel = channel;
	}
	public TraChannelMerch getChannelMerch() {
		return channelMerch;
	}
	public void setChannelMerch(TraChannelMerch channelMerch) {
		this.channelMerch = channelMerch;
	}
	public String getChannelName() {
		return channelName;
	}
	public void setChannelName(String channelName) {
		this.channelName = channelName;
	}
	public String getChannelMerchName() {
		return channelMerchName;
	}
	public void setChannelMerchName(String channelMerchName) {
		this.channelMerchName = channelMerchName;
	}
	public String getChannelMerchNo() {
		return channelMerchNo;
	}
	public void setChannelMerchNo(String channelMerchNo) {
		this.channelMerchNo = channelMerchNo;
	}
	public String getChannelOrderNo() {
		return channelOrderNo;
	}
	public void setChannelOrderNo(String channelOrderNo) {
		this.channelOrderNo = channelOrderNo;
	}
	
}
